﻿using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using WebApiClientCore.Attributes;
using XUCore.WeChat.Apis;

namespace XUCore.WeChat.Enterprise.Apis.Group.WelCome
{
    /// <summary>
    /// https://developer.work.weixin.qq.com/document/path/91023
    /// </summary>
    [HttpHost("https://qyapi.weixin.qq.com/cgi-bin/")]
    public interface IEnterpriseGroupWelComeApi : IEnterpriseWeChatApiWithAccessTokenFilter
    {
        // /// <summary>
        // /// 发送新客户欢迎语<para/>
        // /// 
        // /// 企业微信在向企业推送添加外部联系人事件时，会额外返回一个welcome_code，企业以此为凭据调用接口，即可通过成员向新添加的客户发送个性化的欢迎语。<para/>
        // /// <see url="https://developer.work.weixin.qq.com/document/path/92137"/>
        // /// </summary>
        // /// <param name="access_token">调用接口凭证</param>
        // /// <param name="input"></param>
        // /// <returns></returns>
        // [HttpPost("externalcontact/send_welcome_msg")]
        // Task<ApiResultBase> SendAsync([Required] string access_token, [JsonNetContent(CharSet = "utf-8")] SendInput input);
        /// <summary>
        /// 发送新客户欢迎语<para/>
        /// 
        /// 企业微信在向企业推送添加外部联系人事件时，会额外返回一个welcome_code，企业以此为凭据调用接口，即可通过成员向新添加的客户发送个性化的欢迎语。<para/>
        /// <see url="https://developer.work.weixin.qq.com/document/path/92137"/>
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost("externalcontact/send_welcome_msg")]
        Task<ApiResultBase> SendAsync([JsonNetContent(CharSet = "utf-8")] SendInput input);

        // /// <summary>
        // /// 添加入群欢迎语素材<para/>
        // /// 
        // /// 企业可通过此API向企业的入群欢迎语素材库中添加素材。每个企业的入群欢迎语素材库中，最多容纳100个素材。<para/>
        // /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        // /// </summary>
        // /// <param name="access_token">调用接口凭证</param>
        // /// <param name="input"></param>
        // /// <returns></returns>
        // [HttpPost("externalcontact/group_welcome_template/add")]
        // Task<AddApiResult> AddAsync([Required] string access_token, [JsonNetContent(CharSet = "utf-8")] AddInput input);

        /// <summary>
        /// 添加入群欢迎语素材<para/>
        /// 
        /// 企业可通过此API向企业的入群欢迎语素材库中添加素材。每个企业的入群欢迎语素材库中，最多容纳100个素材。<para/>
        /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost("externalcontact/group_welcome_template/add")]
        Task<AddApiResult> AddAsync([JsonNetContent(CharSet = "utf-8")] AddInput input);

        // /// <summary>
        // /// 编辑入群欢迎语素材<para/>
        // /// 
        // /// 企业可通过此API编辑入群欢迎语素材库中的素材，且仅能够编辑调用方自己创建的入群欢迎语素材。<para/>
        // /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        // /// </summary>
        // /// <param name="access_token">调用接口凭证</param>
        // /// <param name="input"></param>
        // /// <returns></returns>
        // [HttpPost("externalcontact/group_welcome_template/edit")]
        // Task<ApiResultBase> UpdateAsync([Required] string access_token, [JsonNetContent(CharSet = "utf-8")] UpdateInput input);

        /// <summary>
        /// 编辑入群欢迎语素材<para/>
        /// 
        /// 企业可通过此API编辑入群欢迎语素材库中的素材，且仅能够编辑调用方自己创建的入群欢迎语素材。<para/>
        /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost("externalcontact/group_welcome_template/edit")]
        Task<ApiResultBase> UpdateAsync([JsonNetContent(CharSet = "utf-8")] UpdateInput input);

        // /// <summary>
        // /// 获取入群欢迎语素材<para/>
        // /// 
        // /// 企业可通过此API获取入群欢迎语素材。<para/>
        // /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        // /// </summary>
        // /// <param name="access_token">调用接口凭证</param>
        // /// <param name="input"></param>
        // /// <returns></returns>
        // [HttpPost("externalcontact/group_welcome_template/get")]
        // Task<TemplateApiResult> GetAsync([Required] string access_token, [JsonNetContent(CharSet = "utf-8")] QueryTemplateInput input);

        /// <summary>
        /// 获取入群欢迎语素材<para/>
        /// 
        /// 企业可通过此API获取入群欢迎语素材。<para/>
        /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost("externalcontact/group_welcome_template/get")]
        Task<TemplateApiResult> GetAsync([JsonNetContent(CharSet = "utf-8")] QueryTemplateInput input);

        // /// <summary>
        // /// 删除入群欢迎语素材<para/>
        // /// 
        // /// 企业可通过此API删除入群欢迎语素材，且仅能删除调用方自己创建的入群欢迎语素材。<para/>
        // /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        // /// </summary>
        // /// <param name="access_token">调用接口凭证</param>
        // /// <param name="input"></param>
        // /// <returns></returns>
        // [HttpPost("externalcontact/group_welcome_template/del")]
        // Task<ApiResultBase> DeleteAsync([Required] string access_token, [JsonNetContent(CharSet = "utf-8")] DeleteInput input);

        /// <summary>
        /// 删除入群欢迎语素材<para/>
        /// 
        /// 企业可通过此API删除入群欢迎语素材，且仅能删除调用方自己创建的入群欢迎语素材。<para/>
        /// <see url="https://developer.work.weixin.qq.com/document/path/92366"/>
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [HttpPost("externalcontact/group_welcome_template/del")]
        Task<ApiResultBase> DeleteAsync([JsonNetContent(CharSet = "utf-8")] DeleteInput input);
    }
}
